package com.lq.ecoldchain.util

import com.lq.ecoldchain.callback.LifeCallBack

/*
*2019/1/18 0018  17:40
*function by lq
*/
object ViewUtils {
   private var clickTime: Long? = 0

    fun exitTime( time: Long): Boolean ?{
        return if (System.currentTimeMillis() - clickTime!! <= time) {
            LifeCallBack.finishAll()
            null
        } else {
            toast { "再点击一次返回键退出应用" }
            clickTime = System.currentTimeMillis()
            true
        }
    }
}